from django.conf.urls.defaults import *
from django.conf import settings

# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
    # Tv Shows
    (r'^$',                                     'Catalog.tv_shows.views.index'),
    (r'^handle_tv_drive/$',                     'Catalog.tv_shows.views.handle_tv_drive'),
    (r'^view_tv_shows/$',                       'Catalog.tv_shows.views.view_tv_shows'),
    (r'^view_tv_show/(?P<show_id>\d+)/$',       'Catalog.tv_shows.views.view_tv_show'),
    (r'^search_tv_shows/$',                     'Catalog.tv_shows.views.search_tv_shows'),
    (r'^add_episodes/(?P<show_id>\d+)/$',       'Catalog.tv_shows.views.add_episodes'),
    (r'^fix_eps/$',                             'Catalog.tv_shows.views.fix_eps'),
    (r'^delete_episode/$',                     'Catalog.tv_shows.views.delete_episode'),

    # Movies
    (r'^handle_movies_drive/$',                 'Catalog.movies.views.handle_movies_drive'),
    (r'^view_movies/$',                         'Catalog.movies.views.view_movies'),
    (r'^search_movies/$',                       'Catalog.movies.views.search_movies'),


    # Uncomment the admin/doc line below and add 'django.contrib.admindocs' 
    # to INSTALLED_APPS to enable admin documentation:
    # (r'^admin/doc/', include('django.contrib.admindocs.urls')),
    # (r'^admin/(.*)', admin.site.root),
)

if settings.DEBUG:
    urlpatterns += patterns( '',
        url( r'^static/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT} ),
    )